package com.vf.admin.client.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.WithdrawFeeLevel;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.ArrayList;

@Repository
public class WithdrawFeeLevelDao extends BaseDao<WithdrawFeeLevel> {

    public BigDecimal get(BigDecimal money) {
        ArrayList<Object> paramList = new ArrayList<>();
        StringBuilder sbStr = new StringBuilder("select * from withdraw_fee_level where money > ? order by money asc limit 1");
        paramList.add(money);
        String sql = sbStr.toString();
        return this.queryObj(sql, paramList, WithdrawFeeLevel.class).getFeeRatio();
    }

}
